package oop.core.skill;

import oop.core.visitors.InteractiveVisitor;

/**
 * Sleep puts an enemy to sleep for a given period of time.
 */
public class Sleep extends InteractiveSkill implements Cloneable{
	private int delayDuration; // base sleep time
	
	/**
	 * Sleep constructor.
	 * @param delayDuration
	 * @param name
	 * @param skillLevel
	 */
	public Sleep(int delayDuration, String name, int skillLevel) {
		super(name, skillLevel);
		this.delayDuration = delayDuration;
	}

	/**
	 * Implement InteractiveSkill's accept().
	 */
	public void accept(InteractiveVisitor v) {
		v.visitSleep(this);
	}

	/**
	 * get/set methods
	 */
	public int getDelayDuration() {
		return delayDuration;
	}

	public void setDelayDuration(int delayDuration) {
		this.delayDuration = delayDuration;
	}
	
	/**
	 * Implement clone.
	 */
	public Sleep clone(){
		Sleep cloned = (Sleep)super.clone();
		cloned.delayDuration = this.delayDuration;
		return cloned;
	}
}
